<?php
include_once("init.php");
?>
<!DOCTYPE HTML >
<html>
 <head>
  <title>欣才商城</title>
  <meta charset="utf-8">
	<link rel="stylesheet" href="./css/header.css">
 </head>

 <body>
 	<div>
	<div id="head">
		<div class="logo">
		<?php
if(isset($_SESSION['user'])){
		?>
			欢迎您，<?=$_SESSION['user']?>会员！
			<a href="./showcar.php">我的购物车</a>
			<a href="./login_out.php">退出</a>
		<?php
			}else{
		?>
			<a href="./login.php">登录</a>
			<a href="">注册</a>
		<?php } ?>
		

		 


		</div>
	</div>
</div>
	<div id="body">
	<?php
		foreach($products as $v){
	?>
		<div class="goods">
			<div class="image">
				<img src="./img/<?= $v['img']?>" width="200px">
			</div>
			<div class="price_addr">
				<p class="price">&yen;<?= $v['price']?>.00</p>
				<p class="addr"><?= $v['addr']?></p>
				<p class="clean"></p>
			</div>
			<div class="name">
			<a href=""><?= $v['name']?></a></div>
			<div class="add">
				<a href="./addcar.php?id=<?=$v['id']?>">加入购物车</a>
			</div>
		</div>
	<?php }?>
	<p class="clean"></p>
	</div>






 </body>
</html>
